1. Field of the Invention
The present invention relates to an image processing apparatus that detects a background color of a document.
In this specification, “brightness” includes “luminance” as a photometric quantity (such as component Y in a YCbCr colormetric system) and “lightness” as a perceptive color (such as component L in an L*a*b* colormetric system) “Color” is a component separate from “brightness” in a three-dimensional color space, for example, the Cb and Cr components (color difference component) in the YCbCr colormetric system and the “a” and “b” components in the L*a*b* colormetric system.
2. Description of Related Art
An image processing apparatus, such as a facsimile machine, a copying machine, and a printer, that applies processing to image data acquired by scanning a document, includes a device capable of selecting a processing mode according to a color of the image data to be processed. For example, for a color image, the image processing apparatus selects a processing mode suitable for a color image, and for a monochrome document, the image processing apparatus selects a processing mode suitable for a monochrome image. Thus, by switching the processing mode, the image processing apparatus can perform suitable processing according to the color of the document.
In order for the image processing apparatus to select the processing mode, the color of the document must be discriminated. Therefore, a so-called ACS (auto color selection) function for automatically discriminating whether the document is color or monochrome is conventionally devised.
In order to discriminate whether the document is color, or black and white, for example, the a*b* plane of the L*a*b* uniform color space in the image processing apparatus is divided into 25 rectangle areas. The image processing apparatus discriminates whether the image data is color or monochrome based on which area data of a pixel included in the image data to be processed belongs.
For example, the color discriminated by an area of a maximum count number of the pixel data belonging to each area on the a*b*plane is set as a background color, and this area is specified as an area of background color.
However, when pixel data belonging to each area of the a*b*plane is counted, for example, and when image data of the background color is distributed over a plurality of areas, the count number of each area is dispersed, thus decreasing the count number itself. Accordingly, there is a possibility of erroneously specifying an area as an area of background color.
In addition, when an area is set in the vicinity of an original point of the a*b*plane (the achromatic axis), when image data attributable to the background color is not distributed in the vicinity of the original point (i.e. is distributed outside of the 25 rectangle areas), there is another problem in that a correct background color area cannot be detected.